package com.mogu.comment.constraint;

import com.mogu.comment.annotion.LongNotNull;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * Description:不在能知，而在能行
 *
 * @author: 梁西华
 * @date: 2020/6/11/14:20
 **/

public class LongValidator implements ConstraintValidator<LongNotNull, Long> {
    @Override
    public void initialize(LongNotNull constraintAnnotation) {

    }

    @Override
    public boolean isValid(Long value, ConstraintValidatorContext context) {
        if (value == null){
            return false;
        }
        return true;
    }
}
